<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

/**
 * 路由群组
 */
Route::group( ['middleware' => 'wxAuth'], function() {
    /**
     * 视图页面路由
     */
    Route::get( '/', 'HomeController@index' );
    Route::get( '/index', 'HomeController@index' );
    Route::get( '/edit/{id}', 'HomeController@edit' );
    Route::get( '/add', 'HomeController@add' );
    Route::get( '/lists', 'HomeController@lists' );

    /**
     * 数据接口路由
     */
    Route::post( '/save', 'HomeController@save' );
} );

/**
 * 微信绑定
 */
Route::get( '/bind/{openid}', 'HomeController@bind' );
Route::post( '/binding', 'HomeController@binding' );